<template>
  <a-spin
    :delay="delay"
    :size="size"
    :spinning="spinning"
    :tip="tip"
    :wrapper-class-name="wrapperClassName"
  >
    <slot />
    <template v-if="$slots.indicator" #indicator>
      <slot name="indicator" />
    </template>
    <template v-if="$slots.tip" #tip>
      <slot name="tip" />
    </template>
  </a-spin>
</template>
<script>
import { defineComponent } from 'vue'
import { Spin } from 'ant-design-vue'
export default defineComponent({
  name: 'ZSpin',
  components: {
    ASpin: Spin
  },
  props: {
    delay: {
      type: Number,
      default: undefined
    },
    size: {
      type: String,
      default: 'default'
    },
    spinning: {
      type: Boolean,
      default: true
    },
    tip: {
      type: String,
      default: undefined
    },
    wrapperClassName: {
      type: String,
      default: undefined
    }
  }
})
</script>
